🤖 Fix misleading workspace ID patterns and rename to generateLegacyId #418
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Resolves misleading comments and patterns suggesting workspace IDs can be constructed from project/branch names. Makes it explicit that workspace IDs come from the backend and the old format is legacy-only.
Changes
1. Fixed Misleading Comments
generateLegacyId()(formerlygenerateWorkspaceId) to explicitly state it's ONLY for legacy supportproject-branchpattern2. Removed Legacy Support from Debug Commands
Debug commands are internal dev tools and don't need backward compatibility:
--workspace-idinstead of deriving from project path3. Renamed Method for Clarity
generateWorkspaceId()→generateLegacyId()makes the legacy-only purpose explicitWhy Keep the Function?
Stable IDs were introduced only 8 days ago (Oct 16). The function is necessary for:
Cost is minimal (80 LoC, 0.5% of config.ts) and breaking workspace access would be severe UX failure.
Testing
generateWorkspaceIdname remainGenerated with
cmux